#include <stdio.h>

double max = 0, min =0;

double average(int n, double score[]);

int main(void)
{
	int i;
	double aver, score[10];

	printf("Input 10 numbers: ");
	for (i = 0; i < 10; i++)
		scanf("%lf", &score[i]);
	aver = average(10, score);
	printf("max = %6.2f\nmin = %6.2f\naver = %6.2f\n", max, min, aver);

	return 0;
}

double average(int n, double score[])
{
	int i;
	double aver, sum;
	
	sum = max = min = score[0];
	for (i = 1; i < n; i++)
	{
		sum += score[i];
		if (score[i] > max)
			max = score[i];
		if (score[i] < min)
			min = score[i];
	}
	aver = sum / n;
	
	return(aver);
}